package com.zhiyou100.service;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.dao.DiscussDao;
import com.zhiyou100.model.Discuss;

@Service
public class DiscussServiceImpl implements DiscussService{

	@Autowired
	private DiscussDao discussDao;
	
	@Override
	public ArrayList<Discuss> list(int id) {

		ArrayList<Discuss> find = discussDao.findAll(id);
		
		return find;
	}

	@Override
	public ArrayList<Discuss> updateList(int progressId) {

		ArrayList<Discuss> find2 = discussDao.findByProgressId(progressId);
		
		return find2;
	}

	@Override
	public void add(Discuss discuss) {

		discussDao.add(discuss);
	}

	@Override
	public void updateAdd(Discuss discuss) {

		discussDao.updateAdd(discuss);
		
	}

}
